home *** CD-ROM | disk | FTP | other *** search
/ World Tours: Brazil / WorldTours: Brazil.iso / mac / content / main.dir / 00057_Script_button interactive (color) < prev    next >
Text File  |  2007-04-22  |  901b  |  31 lines

  1. property pSelf,fColor,bColor,handle,linkSprite
  2.  
  3. on beginsprite
  4.   pSelf=sprite(the currentSpriteNum)
  5. end
  6.  
  7. on mouseenter
  8.   pSelf.forecolor=fColor
  9.   if linkSprite<>sprite(0) then linkSprite.mouseenter()
  10.   --cursor 280
  11. end
  12.  
  13. on mouseleave
  14.   pSelf.forecolor=bColor
  15.   if linkSprite<>sprite(0) then linkSprite.mouseleave()
  16.   --cursor -1
  17. end
  18.  
  19. on mouseup
  20.   if handle<>void then do(handle)
  21.   if linkSprite<>sprite(0) then linkSprite.mouseup()
  22. end
  23.  
  24. on getPropertyDescriptionList
  25.   description = [:]
  26.   addProp description,#fColor, [#default:5, #format:#integer, #comment:"mouse over color"]
  27.   addProp description,#bColor, [#default:0, #format:#integer, #comment:"mouse out color"]
  28.   addProp description,#handle, [#default:"", #format:#string, #comment:"command"]
  29.   addProp description,#linkSprite, [#default:sprite(0), #format:#sprite, #comment:"Link Sprite"]
  30.   return description
  31. end